
@extends('qiwei.main')

@section('content')

    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户中心 <span
            class="c-gray en">&gt;</span> 用户管理 <a class="btn btn-success radius r"
                                                  style="line-height:1.6em;margin-top:3px"
                                                  href="javascript:location.replace(location.href);" title="刷新"><i
                class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="page-container">

        <div class="text-c">
            <form action="" method="get">
                <input type="text" class="input-text" style="width:250px" placeholder="输入会员名称、电话、邮箱" id=""
                       name="activity_name" value="{{$activity_name}}">
                <button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜用户
                </button>
            </form>
        </div>

        <div class="cl pd-5 bg-1 bk-gray mt-20"><span class="l"><a href=""
                                                                   class="btn btn-danger radius deleteAll"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
                <a href="{{route('ArtivityCreate')}}" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加活动</a></span> <span
                class="r">共有数据：<strong>88</strong> 条</span></div>
        <div class="mt-20">

            @include('qiwei.error')
            <table class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                <tr class="text-c">
                    <th width="25"><input type="checkbox" id="checkAll"></th>
                    <th width="80">ID</th>
                    <th width="100">活动名称</th>
                    <th width="40">活动标题</th>
                    <th width="60">活动状态</th>
                    <th width="30">是否上架</th>
                    <th width="100">开始时间</th>
                    <th width="100">结束时间</th>
                    <th width="80px">操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach($data as $key=>$val)
                    <td><input type="checkbox"  class="check" data-id="{{$val['id']}}" name="id[]"></td>
                    <td>{{$val['id']}}</td>
                    <td>{!!str_replace($activity_name,"<span style='color:red'>$activity_name</span>",$val['activity_name'])!!}</td>
                    <td>{{$val['activity_title']}}</td>
                    <td>@if($val['status']==0)
                            <span class="btn btn-primary">未开始</span>
                        @elseif($val['status']==1)
                            <span class="btn btn-warning">已开始</span>
                        @else
                            <span class="btn btn-success">已结束</span>
                        @endif

                    </td>
                    <td>
                        @if($val['is_on_sale']==1)
                            <span class="btn btn-warning">上架</span>
                        @else
                            <span class="btn btn-danger">下架</span>
                            @endif
                    </td>
                    <td>{{$val['start_time']}}</td>
                    <td>{{$val['end_time']}}</td>
                    <td class="td-manage">
                        <a title="编辑" href="" class="label label-primary radius">编辑</a>
                        <a title="删除" href="{{route('activityDel',['id'=>$val['id']])}}"
                           class="label label-danger radius delbtn">删除</a>
                    </td>
                    </tr>
                @endforeach
                </tbody>
            </table>

            {{$data->appends(['activity_name'=>$activity_name])->links()}}


        </div>

        @endsection


